import {message} from "antd";

let showMessage = false
/**
 * 提示信息
 * @param msg {string}
 * @param type {string}
 */
export default function setMessage(msg, type) {
  if (!showMessage) {
    showMessage = true;
    message[type](msg, 1, () => {
      showMessage = false;
    });
  }
}

